#ifndef TEXTURE_H
#define TEXTURE_H

#include <GL/gl.h>
#include <QImage>

#include "src/defines/texture.h"

#include "src/scene/color.h"

#include "src/math/vector3d.h"

#if !USE_CONSOLE
class GLWidget;
#endif //!USE_CONSOLE
class Object;

struct Texture {
    #if USE_CONSOLE
	Texture(const QString &, unsigned int = 5, unsigned int = 5, unsigned int = MULTIPLY, unsigned int = ORIGINAL_TEXTURE);
	#else //USE_CONSOLE
	Texture(GLWidget * = NULL, const QString & = "", unsigned int = 5, unsigned int = 5, unsigned int = MULTIPLY, unsigned int = ORIGINAL_TEXTURE);
	void useTexture();
	#endif //USE_CONSOLE
	~Texture();

	void getMinMax(double *, double *, double *, double *) const;
    Color getColor(Object *, const Vector3D &) const;

    QImage textureImage;
    QString textureImagePathName;
    GLuint glTexture;
    unsigned int mappingType;
    unsigned int coloringType;
    unsigned int repeatTimesU; //numero de vezes que ira repetir
    unsigned int repeatTimesV; //numero de vezes que ira repetir
};

#endif

